package drds.binlog.protocol.protocol_proto;

/**
 * <pre>
 *  PullRequest
 * </pre>
 * <p>
 * Protobuf type {@code com.alibaba.otter.canal.protocol.Get}
 */
public final class Get extends
        com.google.protobuf.GeneratedMessageV3 implements
        // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Get)
        GetOrBuilder
{
    public static final int DESTINATION_FIELD_NUMBER = 1;
    public static final int CLIENT_ID_FIELD_NUMBER = 2;
    public static final int FETCH_SIZE_FIELD_NUMBER = 3;
    public static final int TIMEOUT_FIELD_NUMBER = 4;
    public static final int UNIT_FIELD_NUMBER = 5;
    public static final int AUTO_ACK_FIELD_NUMBER = 6;
    private static final long serialVersionUID = 0L;
    // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Get)
    private static final Get DEFAULT_INSTANCE;
    private static final com.google.protobuf.Parser<Get>
            PARSER = new com.google.protobuf.AbstractParser<Get>()
    {
        @Override
        public Get parsePartialFrom(
                com.google.protobuf.CodedInputStream input,
                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                throws com.google.protobuf.InvalidProtocolBufferException
        {
            return new Get(input, extensionRegistry);
        }
    };

    static
    {
        DEFAULT_INSTANCE = new Get();
    }

    ;

    private int timeoutPresentCase_ = 0;
    private Object timeoutPresent_;
    private int unitPresentCase_ = 0;
    private Object unitPresent_;

    ;
    private int autoAckPresentCase_ = 0;
    private Object autoAckPresent_;
    private volatile Object destination_;
    private volatile Object clientId_;

    ;
    private int fetchSize_;
    private byte memoizedIsInitialized = -1;

    // Use Get.newBuilder() to construct.
    private Get(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)
    {
        super(builder);
    }

    private Get()
    {
        destination_ = "";
        clientId_ = "";
        fetchSize_ = 0;
    }

    private Get(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException
    {
        this();
        if (extensionRegistry == null)
        {
            throw new NullPointerException();
        }
        int mutable_bitField0_ = 0;
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
                com.google.protobuf.UnknownFieldSet.newBuilder();
        try
        {
            boolean done = false;
            while (!done)
            {
                int tag = input.readTag();
                switch (tag)
                {
                    case 0:
                        done = true;
                        break;
                    case 10:
                    {
                        String s = input.readStringRequireUtf8();

                        destination_ = s;
                        break;
                    }
                    case 18:
                    {
                        String s = input.readStringRequireUtf8();

                        clientId_ = s;
                        break;
                    }
                    case 24:
                    {

                        fetchSize_ = input.readInt32();
                        break;
                    }
                    case 32:
                    {
                        timeoutPresentCase_ = 4;
                        timeoutPresent_ = input.readInt64();
                        break;
                    }
                    case 40:
                    {
                        unitPresentCase_ = 5;
                        unitPresent_ = input.readInt32();
                        break;
                    }
                    case 48:
                    {
                        autoAckPresentCase_ = 6;
                        autoAckPresent_ = input.readBool();
                        break;
                    }
                    default:
                    {
                        if (!parseUnknownFieldProto3(
                                input, unknownFields, extensionRegistry, tag))
                        {
                            done = true;
                        }
                        break;
                    }
                }
            }
        } catch (com.google.protobuf.InvalidProtocolBufferException e)
        {
            throw e.setUnfinishedMessage(this);
        } catch (java.io.IOException e)
        {
            throw new com.google.protobuf.InvalidProtocolBufferException(
                    e).setUnfinishedMessage(this);
        } finally
        {
            this.unknownFields = unknownFields.build();
            makeExtensionsImmutable();
        }
    }

    public static final com.google.protobuf.Descriptors.Descriptor
    getDescriptor()
    {
        return BinlogPacket.protocol_Get_descriptor;
    }

    public static Get parseFrom(
            java.nio.ByteBuffer data)
            throws com.google.protobuf.InvalidProtocolBufferException
    {
        return PARSER.parseFrom(data);
    }

    public static Get parseFrom(
            java.nio.ByteBuffer data,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException
    {
        return PARSER.parseFrom(data, extensionRegistry);
    }

    public static Get parseFrom(
            com.google.protobuf.ByteString data)
            throws com.google.protobuf.InvalidProtocolBufferException
    {
        return PARSER.parseFrom(data);
    }

    public static Get parseFrom(
            com.google.protobuf.ByteString data,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException
    {
        return PARSER.parseFrom(data, extensionRegistry);
    }

    public static Get parseFrom(byte[] data)
            throws com.google.protobuf.InvalidProtocolBufferException
    {
        return PARSER.parseFrom(data);
    }

    public static Get parseFrom(
            byte[] data,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException
    {
        return PARSER.parseFrom(data, extensionRegistry);
    }

    public static Get parseFrom(java.io.InputStream input)
            throws java.io.IOException
    {
        return com.google.protobuf.GeneratedMessageV3
                .parseWithIOException(PARSER, input);
    }

    public static Get parseFrom(
            java.io.InputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws java.io.IOException
    {
        return com.google.protobuf.GeneratedMessageV3
                .parseWithIOException(PARSER, input, extensionRegistry);
    }

    public static Get parseDelimitedFrom(java.io.InputStream input)
            throws java.io.IOException
    {
        return com.google.protobuf.GeneratedMessageV3
                .parseDelimitedWithIOException(PARSER, input);
    }

    public static Get parseDelimitedFrom(
            java.io.InputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws java.io.IOException
    {
        return com.google.protobuf.GeneratedMessageV3
                .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
    }

    public static Get parseFrom(
            com.google.protobuf.CodedInputStream input)
            throws java.io.IOException
    {
        return com.google.protobuf.GeneratedMessageV3
                .parseWithIOException(PARSER, input);
    }

    public static Get parseFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws java.io.IOException
    {
        return com.google.protobuf.GeneratedMessageV3
                .parseWithIOException(PARSER, input, extensionRegistry);
    }

    public static Builder newBuilder()
    {
        return DEFAULT_INSTANCE.toBuilder();
    }

    public static Builder newBuilder(Get prototype)
    {
        return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    public static Get getDefaultInstance()
    {
        return DEFAULT_INSTANCE;
    }

    public static com.google.protobuf.Parser<Get> parser()
    {
        return PARSER;
    }

    @Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields()
    {
        return this.unknownFields;
    }

    @Override
    protected FieldAccessorTable
    internalGetFieldAccessorTable()
    {
        return BinlogPacket.protocol_Get_fieldAccessorTable
                .ensureFieldAccessorsInitialized(
                        Get.class, Builder.class);
    }

    public TimeoutPresentCase
    getTimeoutPresentCase()
    {
        return TimeoutPresentCase.forNumber(
                timeoutPresentCase_);
    }

    public UnitPresentCase
    getUnitPresentCase()
    {
        return UnitPresentCase.forNumber(
                unitPresentCase_);
    }

    public AutoAckPresentCase
    getAutoAckPresentCase()
    {
        return AutoAckPresentCase.forNumber(
                autoAckPresentCase_);
    }

    /**
     * <code>string destination = 1;</code>
     */
    public String getDestination()
    {
        Object ref = destination_;
        if (ref instanceof String)
        {
            return (String) ref;
        } else
        {
            com.google.protobuf.ByteString bs =
                    (com.google.protobuf.ByteString) ref;
            String s = bs.toStringUtf8();
            destination_ = s;
            return s;
        }
    }

    /**
     * <code>string destination = 1;</code>
     */
    public com.google.protobuf.ByteString
    getDestinationBytes()
    {
        Object ref = destination_;
        if (ref instanceof String)
        {
            com.google.protobuf.ByteString b =
                    com.google.protobuf.ByteString.copyFromUtf8(
                            (String) ref);
            destination_ = b;
            return b;
        } else
        {
            return (com.google.protobuf.ByteString) ref;
        }
    }

    /**
     * <code>string client_id = 2;</code>
     */
    public String getClientId()
    {
        Object ref = clientId_;
        if (ref instanceof String)
        {
            return (String) ref;
        } else
        {
            com.google.protobuf.ByteString bs =
                    (com.google.protobuf.ByteString) ref;
            String s = bs.toStringUtf8();
            clientId_ = s;
            return s;
        }
    }

    /**
     * <code>string client_id = 2;</code>
     */
    public com.google.protobuf.ByteString
    getClientIdBytes()
    {
        Object ref = clientId_;
        if (ref instanceof String)
        {
            com.google.protobuf.ByteString b =
                    com.google.protobuf.ByteString.copyFromUtf8(
                            (String) ref);
            clientId_ = b;
            return b;
        } else
        {
            return (com.google.protobuf.ByteString) ref;
        }
    }

    /**
     * <code>int32 fetch_size = 3;</code>
     */
    public int getFetchSize()
    {
        return fetchSize_;
    }

    /**
     * <pre>
     * 默认-1时代表不控制
     * </pre>
     * <p>
     * <code>int64 timeout = 4;</code>
     */
    public long getTimeout()
    {
        if (timeoutPresentCase_ == 4)
        {
            return (Long) timeoutPresent_;
        }
        return -1L;
    }

    /**
     * <pre>
     * 数字类型，0:纳秒,1:毫秒,2:微秒,3:秒,4:分钟,5:小时,6:天
     * </pre>
     * <p>
     * <code>int32 unit = 5;</code>
     */
    public int getUnit()
    {
        if (unitPresentCase_ == 5)
        {
            return (Integer) unitPresent_;
        }
        return 2;
    }

    /**
     * <pre>
     * 是否自动ack
     * </pre>
     * <p>
     * <code>bool auto_ack = 6;</code>
     */
    public boolean getAutoAck()
    {
        if (autoAckPresentCase_ == 6)
        {
            return (Boolean) autoAckPresent_;
        }
        return false;
    }

    @Override
    public final boolean isInitialized()
    {
        byte isInitialized = memoizedIsInitialized;
        if (isInitialized == 1) return true;
        if (isInitialized == 0) return false;

        memoizedIsInitialized = 1;
        return true;
    }

    @Override
    public void writeTo(com.google.protobuf.CodedOutputStream output)
            throws java.io.IOException
    {
        if (!getDestinationBytes().isEmpty())
        {
            com.google.protobuf.GeneratedMessageV3.writeString(output, 1, destination_);
        }
        if (!getClientIdBytes().isEmpty())
        {
            com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clientId_);
        }
        if (fetchSize_ != 0)
        {
            output.writeInt32(3, fetchSize_);
        }
        if (timeoutPresentCase_ == 4)
        {
            output.writeInt64(
                    4, (long) ((Long) timeoutPresent_));
        }
        if (unitPresentCase_ == 5)
        {
            output.writeInt32(
                    5, (int) ((Integer) unitPresent_));
        }
        if (autoAckPresentCase_ == 6)
        {
            output.writeBool(
                    6, (boolean) ((Boolean) autoAckPresent_));
        }
        unknownFields.writeTo(output);
    }

    @Override
    public int getSerializedSize()
    {
        int size = memoizedSize;
        if (size != -1) return size;

        size = 0;
        if (!getDestinationBytes().isEmpty())
        {
            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, destination_);
        }
        if (!getClientIdBytes().isEmpty())
        {
            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clientId_);
        }
        if (fetchSize_ != 0)
        {
            size += com.google.protobuf.CodedOutputStream
                    .computeInt32Size(3, fetchSize_);
        }
        if (timeoutPresentCase_ == 4)
        {
            size += com.google.protobuf.CodedOutputStream
                    .computeInt64Size(
                            4, (long) ((Long) timeoutPresent_));
        }
        if (unitPresentCase_ == 5)
        {
            size += com.google.protobuf.CodedOutputStream
                    .computeInt32Size(
                            5, (int) ((Integer) unitPresent_));
        }
        if (autoAckPresentCase_ == 6)
        {
            size += com.google.protobuf.CodedOutputStream
                    .computeBoolSize(
                            6, (boolean) ((Boolean) autoAckPresent_));
        }
        size += unknownFields.getSerializedSize();
        memoizedSize = size;
        return size;
    }

    @Override
    public boolean equals(final Object obj)
    {
        if (obj == this)
        {
            return true;
        }
        if (!(obj instanceof Get))
        {
            return super.equals(obj);
        }
        Get other = (Get) obj;

        boolean result = true;
        result = result && getDestination()
                .equals(other.getDestination());
        result = result && getClientId()
                .equals(other.getClientId());
        result = result && (getFetchSize()
                == other.getFetchSize());
        result = result && getTimeoutPresentCase().equals(
                other.getTimeoutPresentCase());
        if (!result) return false;
        switch (timeoutPresentCase_)
        {
            case 4:
                result = result && (getTimeout()
                        == other.getTimeout());
                break;
            case 0:
            default:
        }
        result = result && getUnitPresentCase().equals(
                other.getUnitPresentCase());
        if (!result) return false;
        switch (unitPresentCase_)
        {
            case 5:
                result = result && (getUnit()
                        == other.getUnit());
                break;
            case 0:
            default:
        }
        result = result && getAutoAckPresentCase().equals(
                other.getAutoAckPresentCase());
        if (!result) return false;
        switch (autoAckPresentCase_)
        {
            case 6:
                result = result && (getAutoAck()
                        == other.getAutoAck());
                break;
            case 0:
            default:
        }
        result = result && unknownFields.equals(other.unknownFields);
        return result;
    }

    @Override
    public int hashCode()
    {
        if (memoizedHashCode != 0)
        {
            return memoizedHashCode;
        }
        int hash = 41;
        hash = (19 * hash) + getDescriptor().hashCode();
        hash = (37 * hash) + DESTINATION_FIELD_NUMBER;
        hash = (53 * hash) + getDestination().hashCode();
        hash = (37 * hash) + CLIENT_ID_FIELD_NUMBER;
        hash = (53 * hash) + getClientId().hashCode();
        hash = (37 * hash) + FETCH_SIZE_FIELD_NUMBER;
        hash = (53 * hash) + getFetchSize();
        switch (timeoutPresentCase_)
        {
            case 4:
                hash = (37 * hash) + TIMEOUT_FIELD_NUMBER;
                hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
                        getTimeout());
                break;
            case 0:
            default:
        }
        switch (unitPresentCase_)
        {
            case 5:
                hash = (37 * hash) + UNIT_FIELD_NUMBER;
                hash = (53 * hash) + getUnit();
                break;
            case 0:
            default:
        }
        switch (autoAckPresentCase_)
        {
            case 6:
                hash = (37 * hash) + AUTO_ACK_FIELD_NUMBER;
                hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
                        getAutoAck());
                break;
            case 0:
            default:
        }
        hash = (29 * hash) + unknownFields.hashCode();
        memoizedHashCode = hash;
        return hash;
    }

    @Override
    public Builder newBuilderForType()
    {
        return newBuilder();
    }

    @Override
    public Builder toBuilder()
    {
        return this == DEFAULT_INSTANCE
                ? new Builder() : new Builder().mergeFrom(this);
    }

    @Override
    protected Builder newBuilderForType(
            BuilderParent parent)
    {
        Builder builder = new Builder(parent);
        return builder;
    }

    @Override
    public com.google.protobuf.Parser<Get> getParserForType()
    {
        return PARSER;
    }

    @Override
    public Get getDefaultInstanceForType()
    {
        return DEFAULT_INSTANCE;
    }

    public enum TimeoutPresentCase
            implements com.google.protobuf.Internal.EnumLite
    {
        TIMEOUT(4),
        TIMEOUTPRESENT_NOT_SET(0);
        private final int value;

        private TimeoutPresentCase(int value)
        {
            this.value = value;
        }

        /**
         * @deprecated Use {@link #forNumber(int)} instead.
         */
        @Deprecated
        public static TimeoutPresentCase valueOf(int value)
        {
            return forNumber(value);
        }

        public static TimeoutPresentCase forNumber(int value)
        {
            switch (value)
            {
                case 4:
                    return TIMEOUT;
                case 0:
                    return TIMEOUTPRESENT_NOT_SET;
                default:
                    return null;
            }
        }

        public int getNumber()
        {
            return this.value;
        }
    }

    public enum UnitPresentCase
            implements com.google.protobuf.Internal.EnumLite
    {
        UNIT(5),
        UNITPRESENT_NOT_SET(0);
        private final int value;

        private UnitPresentCase(int value)
        {
            this.value = value;
        }

        /**
         * @deprecated Use {@link #forNumber(int)} instead.
         */
        @Deprecated
        public static UnitPresentCase valueOf(int value)
        {
            return forNumber(value);
        }

        public static UnitPresentCase forNumber(int value)
        {
            switch (value)
            {
                case 5:
                    return UNIT;
                case 0:
                    return UNITPRESENT_NOT_SET;
                default:
                    return null;
            }
        }

        public int getNumber()
        {
            return this.value;
        }
    }

    public enum AutoAckPresentCase
            implements com.google.protobuf.Internal.EnumLite
    {
        AUTO_ACK(6),
        AUTOACKPRESENT_NOT_SET(0);
        private final int value;

        private AutoAckPresentCase(int value)
        {
            this.value = value;
        }

        /**
         * @deprecated Use {@link #forNumber(int)} instead.
         */
        @Deprecated
        public static AutoAckPresentCase valueOf(int value)
        {
            return forNumber(value);
        }

        public static AutoAckPresentCase forNumber(int value)
        {
            switch (value)
            {
                case 6:
                    return AUTO_ACK;
                case 0:
                    return AUTOACKPRESENT_NOT_SET;
                default:
                    return null;
            }
        }

        public int getNumber()
        {
            return this.value;
        }
    }

    /**
     * <pre>
     *  PullRequest
     * </pre>
     * <p>
     * Protobuf type {@code com.alibaba.otter.canal.protocol.Get}
     */
    public static final class Builder extends
            com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
            // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.Get)
            GetOrBuilder
    {
        private int timeoutPresentCase_ = 0;
        private Object timeoutPresent_;
        private int unitPresentCase_ = 0;
        private Object unitPresent_;
        private int autoAckPresentCase_ = 0;
        private Object autoAckPresent_;
        private Object destination_ = "";
        private Object clientId_ = "";
        private int fetchSize_;

        // Construct using BinlogPacket.Get.newBuilder()
        private Builder()
        {
            maybeForceBuilderInitialization();
        }

        private Builder(
                BuilderParent parent)
        {
            super(parent);
            maybeForceBuilderInitialization();
        }

        public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor()
        {
            return BinlogPacket.protocol_Get_descriptor;
        }

        @Override
        protected FieldAccessorTable
        internalGetFieldAccessorTable()
        {
            return BinlogPacket.protocol_Get_fieldAccessorTable
                    .ensureFieldAccessorsInitialized(
                            Get.class, Builder.class);
        }

        private void maybeForceBuilderInitialization()
        {
            if (com.google.protobuf.GeneratedMessageV3
                    .alwaysUseFieldBuilders)
            {
            }
        }

        @Override
        public Builder clear()
        {
            super.clear();
            destination_ = "";

            clientId_ = "";

            fetchSize_ = 0;

            timeoutPresentCase_ = 0;
            timeoutPresent_ = null;
            unitPresentCase_ = 0;
            unitPresent_ = null;
            autoAckPresentCase_ = 0;
            autoAckPresent_ = null;
            return this;
        }

        @Override
        public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType()
        {
            return BinlogPacket.protocol_Get_descriptor;
        }

        @Override
        public Get getDefaultInstanceForType()
        {
            return Get.getDefaultInstance();
        }

        @Override
        public Get build()
        {
            Get result = buildPartial();
            if (!result.isInitialized())
            {
                throw newUninitializedMessageException(result);
            }
            return result;
        }

        @Override
        public Get buildPartial()
        {
            Get result = new Get(this);
            result.destination_ = destination_;
            result.clientId_ = clientId_;
            result.fetchSize_ = fetchSize_;
            if (timeoutPresentCase_ == 4)
            {
                result.timeoutPresent_ = timeoutPresent_;
            }
            if (unitPresentCase_ == 5)
            {
                result.unitPresent_ = unitPresent_;
            }
            if (autoAckPresentCase_ == 6)
            {
                result.autoAckPresent_ = autoAckPresent_;
            }
            result.timeoutPresentCase_ = timeoutPresentCase_;
            result.unitPresentCase_ = unitPresentCase_;
            result.autoAckPresentCase_ = autoAckPresentCase_;
            onBuilt();
            return result;
        }

        @Override
        public Builder clone()
        {
            return (Builder) super.clone();
        }

        @Override
        public Builder setField(
                com.google.protobuf.Descriptors.FieldDescriptor field,
                Object value)
        {
            return (Builder) super.setField(field, value);
        }

        @Override
        public Builder clearField(
                com.google.protobuf.Descriptors.FieldDescriptor field)
        {
            return (Builder) super.clearField(field);
        }

        @Override
        public Builder clearOneof(
                com.google.protobuf.Descriptors.OneofDescriptor oneof)
        {
            return (Builder) super.clearOneof(oneof);
        }

        @Override
        public Builder setRepeatedField(
                com.google.protobuf.Descriptors.FieldDescriptor field,
                int index, Object value)
        {
            return (Builder) super.setRepeatedField(field, index, value);
        }

        @Override
        public Builder addRepeatedField(
                com.google.protobuf.Descriptors.FieldDescriptor field,
                Object value)
        {
            return (Builder) super.addRepeatedField(field, value);
        }

        @Override
        public Builder mergeFrom(com.google.protobuf.Message other)
        {
            if (other instanceof Get)
            {
                return mergeFrom((Get) other);
            } else
            {
                super.mergeFrom(other);
                return this;
            }
        }

        public Builder mergeFrom(Get other)
        {
            if (other == Get.getDefaultInstance()) return this;
            if (!other.getDestination().isEmpty())
            {
                destination_ = other.destination_;
                onChanged();
            }
            if (!other.getClientId().isEmpty())
            {
                clientId_ = other.clientId_;
                onChanged();
            }
            if (other.getFetchSize() != 0)
            {
                setFetchSize(other.getFetchSize());
            }
            switch (other.getTimeoutPresentCase())
            {
                case TIMEOUT:
                {
                    setTimeout(other.getTimeout());
                    break;
                }
                case TIMEOUTPRESENT_NOT_SET:
                {
                    break;
                }
            }
            switch (other.getUnitPresentCase())
            {
                case UNIT:
                {
                    setUnit(other.getUnit());
                    break;
                }
                case UNITPRESENT_NOT_SET:
                {
                    break;
                }
            }
            switch (other.getAutoAckPresentCase())
            {
                case AUTO_ACK:
                {
                    setAutoAck(other.getAutoAck());
                    break;
                }
                case AUTOACKPRESENT_NOT_SET:
                {
                    break;
                }
            }
            this.mergeUnknownFields(other.unknownFields);
            onChanged();
            return this;
        }

        @Override
        public final boolean isInitialized()
        {
            return true;
        }

        @Override
        public Builder mergeFrom(
                com.google.protobuf.CodedInputStream input,
                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                throws java.io.IOException
        {
            Get parsedMessage = null;
            try
            {
                parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
            } catch (com.google.protobuf.InvalidProtocolBufferException e)
            {
                parsedMessage = (Get) e.getUnfinishedMessage();
                throw e.unwrapIOException();
            } finally
            {
                if (parsedMessage != null)
                {
                    mergeFrom(parsedMessage);
                }
            }
            return this;
        }

        public TimeoutPresentCase
        getTimeoutPresentCase()
        {
            return TimeoutPresentCase.forNumber(
                    timeoutPresentCase_);
        }

        public Builder clearTimeoutPresent()
        {
            timeoutPresentCase_ = 0;
            timeoutPresent_ = null;
            onChanged();
            return this;
        }

        public UnitPresentCase
        getUnitPresentCase()
        {
            return UnitPresentCase.forNumber(
                    unitPresentCase_);
        }

        public Builder clearUnitPresent()
        {
            unitPresentCase_ = 0;
            unitPresent_ = null;
            onChanged();
            return this;
        }

        public AutoAckPresentCase
        getAutoAckPresentCase()
        {
            return AutoAckPresentCase.forNumber(
                    autoAckPresentCase_);
        }

        public Builder clearAutoAckPresent()
        {
            autoAckPresentCase_ = 0;
            autoAckPresent_ = null;
            onChanged();
            return this;
        }

        /**
         * <code>string destination = 1;</code>
         */
        public String getDestination()
        {
            Object ref = destination_;
            if (!(ref instanceof String))
            {
                com.google.protobuf.ByteString bs =
                        (com.google.protobuf.ByteString) ref;
                String s = bs.toStringUtf8();
                destination_ = s;
                return s;
            } else
            {
                return (String) ref;
            }
        }

        /**
         * <code>string destination = 1;</code>
         */
        public Builder setDestination(
                String value)
        {
            if (value == null)
            {
                throw new NullPointerException();
            }

            destination_ = value;
            onChanged();
            return this;
        }

        /**
         * <code>string destination = 1;</code>
         */
        public com.google.protobuf.ByteString
        getDestinationBytes()
        {
            Object ref = destination_;
            if (ref instanceof String)
            {
                com.google.protobuf.ByteString b =
                        com.google.protobuf.ByteString.copyFromUtf8(
                                (String) ref);
                destination_ = b;
                return b;
            } else
            {
                return (com.google.protobuf.ByteString) ref;
            }
        }

        /**
         * <code>string destination = 1;</code>
         */
        public Builder setDestinationBytes(
                com.google.protobuf.ByteString value)
        {
            if (value == null)
            {
                throw new NullPointerException();
            }
            checkByteStringIsUtf8(value);

            destination_ = value;
            onChanged();
            return this;
        }

        /**
         * <code>string destination = 1;</code>
         */
        public Builder clearDestination()
        {

            destination_ = getDefaultInstance().getDestination();
            onChanged();
            return this;
        }

        /**
         * <code>string client_id = 2;</code>
         */
        public String getClientId()
        {
            Object ref = clientId_;
            if (!(ref instanceof String))
            {
                com.google.protobuf.ByteString bs =
                        (com.google.protobuf.ByteString) ref;
                String s = bs.toStringUtf8();
                clientId_ = s;
                return s;
            } else
            {
                return (String) ref;
            }
        }

        /**
         * <code>string client_id = 2;</code>
         */
        public Builder setClientId(
                String value)
        {
            if (value == null)
            {
                throw new NullPointerException();
            }

            clientId_ = value;
            onChanged();
            return this;
        }

        /**
         * <code>string client_id = 2;</code>
         */
        public com.google.protobuf.ByteString
        getClientIdBytes()
        {
            Object ref = clientId_;
            if (ref instanceof String)
            {
                com.google.protobuf.ByteString b =
                        com.google.protobuf.ByteString.copyFromUtf8(
                                (String) ref);
                clientId_ = b;
                return b;
            } else
            {
                return (com.google.protobuf.ByteString) ref;
            }
        }

        /**
         * <code>string client_id = 2;</code>
         */
        public Builder setClientIdBytes(
                com.google.protobuf.ByteString value)
        {
            if (value == null)
            {
                throw new NullPointerException();
            }
            checkByteStringIsUtf8(value);

            clientId_ = value;
            onChanged();
            return this;
        }

        /**
         * <code>string client_id = 2;</code>
         */
        public Builder clearClientId()
        {

            clientId_ = getDefaultInstance().getClientId();
            onChanged();
            return this;
        }

        /**
         * <code>int32 fetch_size = 3;</code>
         */
        public int getFetchSize()
        {
            return fetchSize_;
        }

        /**
         * <code>int32 fetch_size = 3;</code>
         */
        public Builder setFetchSize(int value)
        {

            fetchSize_ = value;
            onChanged();
            return this;
        }

        /**
         * <code>int32 fetch_size = 3;</code>
         */
        public Builder clearFetchSize()
        {

            fetchSize_ = 0;
            onChanged();
            return this;
        }

        /**
         * <pre>
         * 默认-1时代表不控制
         * </pre>
         * <p>
         * <code>int64 timeout = 4;</code>
         */
        public long getTimeout()
        {
            if (timeoutPresentCase_ == 4)
            {
                return (Long) timeoutPresent_;
            }
            return 0L;
        }

        /**
         * <pre>
         * 默认-1时代表不控制
         * </pre>
         * <p>
         * <code>int64 timeout = 4;</code>
         */
        public Builder setTimeout(long value)
        {
            timeoutPresentCase_ = 4;
            timeoutPresent_ = value;
            onChanged();
            return this;
        }

        /**
         * <pre>
         * 默认-1时代表不控制
         * </pre>
         * <p>
         * <code>int64 timeout = 4;</code>
         */
        public Builder clearTimeout()
        {
            if (timeoutPresentCase_ == 4)
            {
                timeoutPresentCase_ = 0;
                timeoutPresent_ = null;
                onChanged();
            }
            return this;
        }

        /**
         * <pre>
         * 数字类型，0:纳秒,1:毫秒,2:微秒,3:秒,4:分钟,5:小时,6:天
         * </pre>
         * <p>
         * <code>int32 unit = 5;</code>
         */
        public int getUnit()
        {
            if (unitPresentCase_ == 5)
            {
                return (Integer) unitPresent_;
            }
            return 0;
        }

        /**
         * <pre>
         * 数字类型，0:纳秒,1:毫秒,2:微秒,3:秒,4:分钟,5:小时,6:天
         * </pre>
         * <p>
         * <code>int32 unit = 5;</code>
         */
        public Builder setUnit(int value)
        {
            unitPresentCase_ = 5;
            unitPresent_ = value;
            onChanged();
            return this;
        }

        /**
         * <pre>
         * 数字类型，0:纳秒,1:毫秒,2:微秒,3:秒,4:分钟,5:小时,6:天
         * </pre>
         * <p>
         * <code>int32 unit = 5;</code>
         */
        public Builder clearUnit()
        {
            if (unitPresentCase_ == 5)
            {
                unitPresentCase_ = 0;
                unitPresent_ = null;
                onChanged();
            }
            return this;
        }

        /**
         * <pre>
         * 是否自动ack
         * </pre>
         * <p>
         * <code>bool auto_ack = 6;</code>
         */
        public boolean getAutoAck()
        {
            if (autoAckPresentCase_ == 6)
            {
                return (Boolean) autoAckPresent_;
            }
            return false;
        }

        /**
         * <pre>
         * 是否自动ack
         * </pre>
         * <p>
         * <code>bool auto_ack = 6;</code>
         */
        public Builder setAutoAck(boolean value)
        {
            autoAckPresentCase_ = 6;
            autoAckPresent_ = value;
            onChanged();
            return this;
        }

        /**
         * <pre>
         * 是否自动ack
         * </pre>
         * <p>
         * <code>bool auto_ack = 6;</code>
         */
        public Builder clearAutoAck()
        {
            if (autoAckPresentCase_ == 6)
            {
                autoAckPresentCase_ = 0;
                autoAckPresent_ = null;
                onChanged();
            }
            return this;
        }

        @Override
        public final Builder setUnknownFields(
                final com.google.protobuf.UnknownFieldSet unknownFields)
        {
            return super.setUnknownFieldsProto3(unknownFields);
        }

        @Override
        public final Builder mergeUnknownFields(
                final com.google.protobuf.UnknownFieldSet unknownFields)
        {
            return super.mergeUnknownFields(unknownFields);
        }


        // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Get)
    }

}
